package com.wdb.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wdb.modules.system.domain.Job;
import com.wdb.modules.system.domain.vo.JobQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: wendaobai@qq.com
 * @date: 2024/3/22 0022 14:59
 */
@Mapper
public interface JobMapper extends BaseMapper<Job> {
  IPage<Job> queryAll(@Param("criteria") JobQueryCriteria criteria, Page<Object> page);

  @Select("select  * from  sys_job job where job.name = #{job.name} and job.job_id <> #{job.id}  ")
  List<Job> queryExistByName(@Param("job") Job job);

  List<Job> queryAll(@Param("criteria") JobQueryCriteria criteria);
}
